﻿using OpenMms.Common.Session;
using System;
using System.Collections.Generic;
using System.Text;

namespace OpenMms.Common.Auth
{
    /// <summary>
    /// Session操作
    /// </summary>
    public interface IAuth
    {
        /// <summary>
        /// 判断是否登录
        /// </summary>
        /// <param name="token"></param>
        /// <param name="otherInfo"></param>
        /// <returns></returns>
        bool CheckLogin(string token = "", string otherInfo = "");
        /// <summary>
        /// 获取当前用户登录信息
        /// </summary>
        /// <returns></returns>
        UserAuthSession GetCurrentUser();
        /// <summary>
        /// 获取用户名
        /// </summary>
        /// <returns></returns>
        string GetUserName();
        /// <summary>
        /// 登出
        /// </summary>
        /// <returns></returns>
        bool Logout();
        /// <summary>
        /// 获取IP
        /// </summary>
        /// <returns></returns>
        string GetIp();
    }
}
